import 'package:flutter/material.dart';
import 'package:jinke/utils/component/component.dart';
import 'package:jinke/utils/util.dart';

class InstructionNewCell extends StatelessWidget {
  const InstructionNewCell({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      decoration: BoxDecoration(
        color: Colors.white,
        borderRadius: BorderRadius.circular(4.r),
          boxShadow: [
            BoxShadow(
                offset: const Offset(1, 1),//x,y轴
                color: const Color(0x1A071428),//投影颜色
                blurRadius: 2.r//投影距离
            )
          ],
      ),
      margin: EdgeInsets.fromLTRB(16.r, 16.r, 16.r, 0),
      child: Stack(
        children: [
          Positioned(
              right: 0,
              child: Container(
                padding: EdgeInsets.symmetric(horizontal: 8.r, vertical: 2.r),
                decoration: BoxDecoration(
                    color: const Color(0xffEF7F13),
                    border: Border.all(color: Color(0XFFEEEEEE),width: 1),
                    borderRadius:
                        BorderRadius.only(bottomLeft: Radius.circular(4.r),topRight: Radius.circular(4.r))),
                child: Text(
                  '新回复',
                  style: TextStyle(
                    color: Colors.white,
                    fontSize: 12.sp,
                  ),
                ),
              )),
          Padding(
            padding: EdgeInsets.fromLTRB(16.r, 25.r, 16.r, 0),
            child: Column(
              children: [
                Text(
                  '芜湖市集群量子中国移动数据中心网络直连项目（修改）',
                  style: TextStyle(
                    color: ColorsUtil.title,
                    fontSize: 16.sp,
                    fontWeight: FontWeight.bold,
                  ),
                ),
                SizedBox(
                  height: 10.r,
                ),
                separatorLine(),
                SizedBox(
                  height: 10.r,
                ),
                Row(
                  children: [
                    loadAvater(size: 40.r),
                    SizedBox(
                      width: 10.r,
                    ),
                    Column(
                      crossAxisAlignment: CrossAxisAlignment.start,
                      children: [
                        Text(
                          '翁局长',
                          style: TextStyle(
                            color: ColorsUtil.title,
                            fontSize: 16.sp,
                            fontWeight: FontWeight.bold,
                          ),
                        ),
                        Text(
                          '昨天12:01',
                          style: TextStyle(
                            color: ColorsUtil.content,
                            fontSize: 12.sp,
                          ),
                        ),
                      ],
                    ),
                  ],
                ),
                Container(
                    padding: EdgeInsets.only(top: 10.r),
                    child: Text.rich(TextSpan(children: [
                      TextSpan(
                        text: '@刘福丽  ',
                        style: TextStyle(
                          color: ColorsUtil.blue,
                          fontSize: 14.sp,
                        ),
                      ),
                      TextSpan(
                        text: '这个工作很重要，一定要引起重视。',
                        style: TextStyle(
                          color: ColorsUtil.title,
                          fontSize: 14.sp,
                        ),
                      ),
                    ]))),
                Container(
                    padding: EdgeInsets.only(top: 10.r),
                    child: Text.rich(TextSpan(children: [
                      TextSpan(
                        text: '@王进方  ',
                        style: TextStyle(
                          color: ColorsUtil.blue,
                          fontSize: 14.sp,
                        ),
                      ),
                      TextSpan(
                        text: '这个工作很重要，一定要引起重视。',
                        style: TextStyle(
                          color: ColorsUtil.title,
                          fontSize: 14.sp,
                        ),
                      ),
                    ]))),
                Container(
                  decoration: BoxDecoration(color: Color(0xffF2F3F7)),
                  margin: EdgeInsets.symmetric(vertical: 10.r),
                  padding: EdgeInsets.all(10.r),
                  child: Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      Text.rich(
                        TextSpan(children: [
                          TextSpan(
                            text: '王进方：',
                            style: TextStyle(
                              color: ColorsUtil.blue,
                              fontSize: 14.sp,
                            ),
                          ),
                          TextSpan(
                            text: '今日下午9点已完成对企服务政策的梳理，具体内容可查看附件',
                            style: TextStyle(
                              color: ColorsUtil.title,
                              fontSize: 14.sp,
                            ),
                          ),
                        ]),
                      ),
                      Text(
                        '\n今天 14:56',
                        style: TextStyle(
                          color: ColorsUtil.title,
                          fontSize: 12.sp,
                        ),
                      ),
                    ],
                  ),
                ),
                SizedBox(
                  height: 10.r,
                ),
                separatorLine(),
                TitleContentItemView(title: '查看详情')
              ],
            ),
          ),
        ],
      ),
    );
  }
}
